# -*- coding: utf-8 -*-
"""
# @created on : 9月 2021/9/26 09:05
# @author     : kevin
# @file       : ini.py
# @software   : PyCharm
# @project    : auto_keyword_data


@license: (C) Copyright 2019-2025, Corporation Limited.
@desc:
"""
import configparser
from utils.path import OperationPath
import os


class OperationIni:
    def __init__(self, file_name='./data_config/base.ini'):
        file_name = os.path.join(OperationPath().get_current_path(), 'data_config', 'base.ini')
        self.config = configparser.ConfigParser()
        self.config.read(file_name, encoding='utf-8')

    def read_cfg(self, section, key):
        value = self.config.get(section, key)
        return value
